Base interface used to create acyclic visitors.

Namespace:  NHibernate.BusinessObjects
Assembly:  NHibernate.BusinessObjects (in NHibernate.BusinessObjects.dll)

Syntax

Visual Basic
Public Interface IBusinessObjectVisitor(Of T) _
	Inherits IVisitor(Of T)
C#
public interface IBusinessObjectVisitor<T> : IVisitor<T>
Visual C++
generic<typename T>
public interface class IBusinessObjectVisitor : IVisitor<T>
JavaScript
JavaScript does not support generic types or methods.

Type Parameters

T
The type of the result returned by the Visit method.

Remarks

The Acyclic Visitor pattern allows new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the dependency cycles that are inherent to the "Gang-Of-Four" Visitor pattern.

The receiver of the visitor casts the visitor to determine if it is the type of visitor it will accept, and if so, passes itself to the visitor.

The Visitor pattern can be used as target for an iteration through a collection of a known set of subtypes or to determine which subtype is currently examined. If there is no need for an enumeration target, and a simple cast is acceptable to determine the subtype, there is no need for the Visitor Pattern.

See Also